package com.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;


/**
 * 咖啡及文化 表定义层。
 *
 * @author admin
 * @since 2024-06-18
 */
public class CultureTableDef extends TableDef {

    private static final long serialVersionUID = 1L;

    /**
     * 咖啡及文化
     */
    public static final CultureTableDef CULTURE = new CultureTableDef();

    
    public final QueryColumn ID = new QueryColumn(this, "id");

    
    public final QueryColumn W_IMG = new QueryColumn(this, "w_img");

    
    public final QueryColumn W_CONTENT = new QueryColumn(this, "w_content");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, W_CONTENT, W_IMG};

    public CultureTableDef() {
        super("", "culture");
    }

    private CultureTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public CultureTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new CultureTableDef("", "culture", alias));
    }

}
